# encoding: utf-8
"""
@author: youfeng
@file: date_util.py
@time: 2018/9/1 上午10:11
"""
from datetime import datetime, timedelta


class DateUtil(object):
    @staticmethod
    def get_before_day(delay_days, fmt="%Y-%m-%d"):
        day = datetime.now() - timedelta(days=delay_days)
        return day.strftime(fmt)


if __name__ == '__main__':
    print DateUtil.get_before_day(7)